﻿using Microsoft.AspNetCore.Mvc;
using System.Security.Cryptography.X509Certificates;
using VM.Common.Result;
using VM.Entity.EntityDto.Member;
using VM.Entity.EntityMap.Member;
using VM.Entity.EntityMap.Token;

namespace VM.IBLL.Member
{
    public interface IMemberBLL : IBaseBLL
    {



        public sys_member MemberRegister(sys_member sys_member);

        /// <summary>
        /// 判断校验、获取刷新后的AccessToken
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="Msg"></param>
        /// <returns></returns>
        public bool CheckMemberKeys(string PublicKey, out string Msg);

        /// <summary>
        /// 添加RefreshToken的值
        /// </summary>
        /// <param name="obj"></param>
        public void AddRefreshKeys(Sys_RefreshToken obj);



        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="typeId">1 手机号  2微信openid</param>
        /// <param name="uniqStr"></param>
        /// <returns></returns>
        public ApiDataResult<sys_member> getMemberInfoByUniqStr(int typeId,string uniqStr);


        public ApiResult CheckMemberIsExit(int checkType,string phone);


        public ApiDataResult<MemberInfoDto> GetMemberInfoByMemberId(int MemberId);

        public ApiDataResult<MemberLoginResMap> MemberSSOLogin(MemberLoginMap obj);

        public ApiDataResult<MemberLoginResMap> MemberMsgLogin(MemberLoginMap obj);



        public ApiDataResult<sys_member> MemberPwdLogin(MemberLoginMap obj);


        public Task<bool> updateMemberNameById(int MemberId, sys_member obj);   
    }
}